<template>
  <div class="silmilar">
    <h2>最新歌曲</h2>
    <div class="come" v-for="(item, index) in listCode" :key="index">
      <div class="come-left">
        <van-image :src="item.picUrl" radius="1rem" />
      </div>
      <div class="come-right">
        <h3>{{ item.name }}</h3>
        <span>{{ item.alg }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      listCode: [],
    };
  },
  created() {
    this.getData();
  },
  methods: {
    getData() {
      this.$request("get", "/personalized/newsong").then((res) => {
        console.log("最新歌曲", res);
        this.listCode = res.result;
        console.log("最新歌曲", this.listCode);
      });
    },
  },
};
</script>

<style scoped>
.come {
  display: flex;
  margin-bottom: 0.5rem;
  border-radius: 5rem;
}
.come-left {
  width: 20%;
  height: 20%;
}
.come-right {
  margin-left: 2rem;
}
</style>